﻿@using BookShop.DTO
@using BookShop.Library.Constant
@using BookShop.Library.Common
@{
    var mod = Session[SessionKey.Moderator] != null ? (Moderator)Session[SessionKey.Moderator] : null;
}
<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 3.0.1
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Follow: www.twitter.com/keenthemes
Like: www.facebook.com/keenthemes
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    <meta content="" name="description" />
    <meta content="" name="author" />
    <!-- BEGIN GLOBAL MANDATORY STYLES -->
    <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/assets/global/plugins/font-awesome/css/font-awesome.min.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/Content/assets/global/plugins/simple-line-icons/simple-line-icons.min.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/Content/assets/global/plugins/bootstrap/css/bootstrap.min.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/Content/assets/global/plugins/uniform/css/uniform.default.css")" rel="stylesheet" type="text/css"/>
    <!-- END GLOBAL MANDATORY STYLES -->
    <!-- BEGIN THEME STYLES -->
    <link href="@Url.Content("~/Content/assets/global/css/components.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/Content/assets/global/css/plugins.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/Content/assets/admin/layout/css/layout.css")" rel="stylesheet" type="text/css"/>
    <link id="style_color" href="@Url.Content("~/Content/assets/admin/layout/css/themes/default.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/Content/custom.css")" rel="stylesheet" type="text/css"/>
    <!-- END THEME STYLES -->
    @RenderSection("css", false)
    <link rel="shortcut icon" href="@Url.Content("~/Content/assets/global/img/favicon.ico")" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<!-- DOC: Apply "page-header-fixed-mobile" and "page-footer-fixed-mobile" class to body element to force fixed header or footer in mobile devices -->
<!-- DOC: Apply "page-sidebar-closed" class to the body and "page-sidebar-menu-closed" class to the sidebar menu element to hide the sidebar by default -->
<!-- DOC: Apply "page-sidebar-hide" class to the body to make the sidebar completely hidden on toggle -->
<!-- DOC: Apply "page-sidebar-closed-hide-logo" class to the body element to make the logo hidden on sidebar toggle -->
<!-- DOC: Apply "page-sidebar-hide" class to body element to completely hide the sidebar on sidebar toggle -->
<!-- DOC: Apply "page-sidebar-fixed" class to have fixed sidebar -->
<!-- DOC: Apply "page-footer-fixed" class to the body element to have fixed footer -->
<!-- DOC: Apply "page-sidebar-reversed" class to put the sidebar on the right side -->
<!-- DOC: Apply "page-full-width" class to the body element to have full width page without the sidebar menu -->
<body class="page-header-fixed ">
    <!-- BEGIN HEADER -->
    <div class="page-header navbar navbar-fixed-top">
        <!-- BEGIN HEADER INNER -->
        <div class="page-header-inner">
            <!-- BEGIN LOGO -->
            <div class="page-logo">
                <div class="menu-toggler sidebar-toggler hide">
                    <!-- DOC: Remove the above "hide" to enable the sidebar toggler button on header -->
                </div>
            </div>
            <!-- END LOGO -->
            <!-- BEGIN RESPONSIVE MENU TOGGLER -->
            <div class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse">
            </div>
            <!-- END RESPONSIVE MENU TOGGLER -->
            <!-- BEGIN TOP NAVIGATION MENU -->
            <div class="top-menu">
                <ul class="nav navbar-nav pull-right">
                    @if (mod != null)
                    {
                        <li class="dropdown dropdown-user">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
                                <span class="username">@mod.Username</span>
                                <i class="fa fa-angle-down"></i>
                            </a>
                            <ul class="dropdown-menu">
                                <li><a href="@Url.Action("Logout", "Home")"><i class="fa fa-key"></i>Đăng xuất</a></li>
                            </ul>
                        </li>
                    }
                    <!-- END USER LOGIN DROPDOWN -->
                </ul>
            </div>
            <!-- END TOP NAVIGATION MENU -->
        </div>
        <!-- END HEADER INNER -->
    </div>
    <!-- END HEADER -->
    <div class="clearfix">
    </div>
    <!-- BEGIN CONTAINER -->
    <div class="page-container">
        <!-- BEGIN SIDEBAR -->
        <div class="page-sidebar-wrapper">
            <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing -->
            <!-- DOC: Change data-auto-speed="200" to adjust the sub menu slide up/down speed -->
            <div class="page-sidebar navbar-collapse collapse">
                <!-- BEGIN SIDEBAR MENU -->
                <ul class="page-sidebar-menu" data-auto-scroll="false" data-auto-speed="200">
                    <!-- DOC: To remove the sidebar toggler from the sidebar you just need to completely remove the below "sidebar-toggler-wrapper" LI element -->
                    <li class="sidebar-toggler-wrapper">
                        <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
                        <div class="sidebar-toggler">
                        </div>
                        <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
                    </li>
                    <li class="start">
                        <a href="@Url.Action("Index", "Home")">
                            <i class="fa fa-home"></i>
                            <span class="title">Trang chủ</span>
                        </a>
                    </li>
                    @if (CommonFunction.CheckModeratorRole(mod, ModeratorRole.BookRead))
                    {
                        <li>
                            <a href="@Url.Action("List", "Book")">
                                <i class="fa fa-book"></i>
                                <span class="title">Quản lý Sách</span>
                            </a>
                        </li>
                    }
                    @if (CommonFunction.CheckModeratorRole(mod, ModeratorRole.CategoryRead))
                    {
                        <li>
                            <a href="@Url.Action("List", "Category")">
                                <i class="fa fa-tag"></i>
                                <span class="title">Quản lý Thể loại</span>
                            </a>
                        </li>
                    }
                    @if (CommonFunction.CheckModeratorRole(mod, ModeratorRole.AuthorRead))
                    {
                        <li>
                            <a href="@Url.Action("List", "Author")">
                                <i class="fa fa-pencil"></i>
                                <span class="title">Quản lý Tác giả</span>
                            </a>
                        </li>
                    }
                    @if (CommonFunction.CheckModeratorRole(mod, ModeratorRole.CustomerRead))
                    {
                        <li>
                            <a href="@Url.Action("List", "Customer")">
                                <i class="fa fa-group"></i>
                                <span class="title">Quản lý Khách hàng</span>
                            </a>
                        </li>
                    }
                    @if (CommonFunction.CheckModeratorRole(mod, ModeratorRole.OrderRead))
                    {
                        <li>
                            <a href="@Url.Action("List", "Order")">
                                <i class="fa fa-file-text"></i>
                                <span class="title">Quản lý Đơn hàng</span>
                            </a>
                        </li>
                    }
                    @if (CommonFunction.CheckModeratorRole(mod, ModeratorRole.RateCommentRead))
                    {
                        <li>
                            <a href="@Url.Action("List", "RateComment")">
                                <i class="fa fa-comments"></i>
                                <span class="title">Quản lý Bình luận</span>
                            </a>
                        </li>
                    }
                    @if (CommonFunction.CheckModeratorRole(mod, ModeratorRole.PublisherRead))
                    {
                        <li>
                            <a href="@Url.Action("List", "Publisher")">
                                <i class="fa fa-suitcase"></i>
                                <span class="title">Quản lý Nhà xuất bản</span>
                            </a>
                        </li>
                    }
                    @if (CommonFunction.CheckModeratorRole(mod, ModeratorRole.DiscountRead))
                    {
                        <li>
                            <a href="@Url.Action("List", "Discount")">
                                <i class="fa fa-usd"></i>
                                <span class="title">Quản lý Giảm giá</span>
                            </a>
                        </li>
                    }
                </ul>
                <!-- END SIDEBAR MENU -->
            </div>
        </div>
        <!-- END SIDEBAR -->
        <!-- BEGIN CONTENT -->
        <div class="page-content-wrapper">
            <div class="page-content">
                <!-- END PAGE HEADER-->
                <!-- BEGIN PAGE CONTENT-->
                <div class="row">
                    <div class="col-md-12">
                        @RenderBody()
                    </div>
                </div>
                <!-- END PAGE CONTENT-->
            </div>
        </div>
        <!-- END CONTENT -->
        @RenderSection("modalbackground", false)
    </div>
    <!-- END CONTAINER -->
    <!-- BEGIN FOOTER -->
    <div class="page-footer">
        <div class="page-footer-inner">
        </div>
        <div class="page-footer-tools">
            <span class="go-top">
                <i class="fa fa-angle-up"></i>
            </span>
        </div>
    </div>
    <!-- END FOOTER -->
    <!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
    <!-- BEGIN CORE PLUGINS -->
    <!--[if lt IE 9]>
   <script src="@Url.Content("~/Content/assets/global/plugins/respond.min.js")"></script>
   <script src="@Url.Content("~/Content/assets/global/plugins/excanvas.min.js")"></script> 
   <![endif]-->
    <script src="@Url.Content("~/Content/assets/global/plugins/jquery-1.11.0.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/assets/global/plugins/jquery-migrate-1.2.1.min.js")" type="text/javascript"></script>
    <!-- IMPORTANT! Load jquery-ui-1.10.3.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
    <script src="@Url.Content("~/Content/assets/global/plugins/jquery-ui/jquery-ui-1.10.3.custom.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/assets/global/plugins/bootstrap/js/bootstrap.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/assets/global/plugins/jquery.blockui.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/assets/global/plugins/jquery.cokie.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/assets/global/plugins/uniform/jquery.uniform.min.js")" type="text/javascript"></script>
    <!-- END CORE PLUGINS -->
    <script src="@Url.Content("~/Content/assets/global/scripts/metronic.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/assets/admin/layout/scripts/layout.js")" type="text/javascript"></script>
    <script>
        jQuery(document).ready(function () {
            Metronic.init(); // init metronic core components
            Layout.init(); // init current layout
        });
    </script>
    @RenderSection("javascript", false)
    <!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>
